package core;

import utilities.MagatzemDades;

/**
 * Created with IntelliJ IDEA.
 * User: Jordi
 * Date: 29/12/12
 * Time: 16:42
 * To change this template use File | Settings | File Templates.
 */
public interface ObjectePersistent extends java.io.Serializable, Cloneable {
    public static final char ORIGINAL = 'O';
    public static final char CREAT = 'C';
    public static final char GUARDAT = 'S';
    public static final char ESBORRAT = 'R';
    public static final char INDEFINIT = 'N';
    public void setValorsOriginals(MagatzemDades valorsOriginals);
    public MagatzemDades getValorsOriginals();
    public void setValorOriginal(String nomCamp, Object valor);
    public Object getValorOriginal(String nomCamp);
    public char getEstatPersistencia();
    public void setEstatPersistencia(char estatPersistencia);
    public int getObjecteId();
    public void setObjecteId(int objecteId);
    public boolean guardar();
    public boolean esborrar();
    public boolean crear();
    public boolean carregar();
    public boolean isCarregat();
    public void setCarregat(boolean carregat);
    public boolean isCarregant();
    public void setCarregant(boolean carregant);
    public boolean isModificat();
    public void setModificat(boolean modificat);
    public void setEnsenyarValor(String camp, Object valorEnsenyat);
    public Object getEnsenyarValor(String camp);
    public boolean syncOriginal();
    public void setPersistentFactoryId(long persistenteFactoryId);
    public long getPersistentFactoryId();

}
